<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/templates/principal.xhtml">
	<ui:define name="corpo">
		<div id="conteudo"
			style="margin: 0 auto; height: 380px; padding: 5px; font-weight: bold;">
			<div style="width: 300px; float: left;">
				<h1>Cadastro do contratante</h1>
			</div>
			<div
				style="padding: 5px; margin-left: 5px; width: 600px; border: 1px dotted #000; background: #fbc9c9; float: left;"
				id="resposta_cpf">
				<b>Porquê o CPF é obrigatório ?</b> Ninguém acertou os seis números
				do concurso 1.483 da Mega-Sena, realizado na noite deste sábado (6).
			</div>
			<div id="formulario" style="clear: both;">
				<h:form prependId="false">
					<div style="padding-left: 30px; float: left; margin-bottom: 10px;">
						<h:messages />
						<h:inputHidden value="#{contratanteBean.contratante.codigo}" />
						<h:inputHidden value="#{contratanteBean.usuario.codigo}" />
						<h:inputHidden value="#{contratanteBean.endereco.codigo}" />
						<h:panelGrid columns="2">
							<h:outputLabel value="Nome " for="nome" />
							<h:inputText id="nome" label="Nome"
								value="#{contratanteBean.contratante.nome}" size="30"
								style="heght:30px;" />
							<h:outputLabel value="E-mail " for="email" />
							<h:inputText id="email" label="E-mail"
								value="#{contratanteBean.contratante.email}" size="30"
								style="heght:30px;" />
							<h:outputLabel value="Login" for="login" />
							<h:inputText id="login" label="Login"
								value="#{contratanteBean.usuario.login}" size="15"
								style="heght:30px;" />
							<h:outputLabel value="CPF " for="cpf" />
							<h:panelGroup>
								<h:panelGrid columns="2">
									<h:inputText id="cpf" label="CPF"
										value="#{contratanteBean.contratante.cpf}" size="30"
										style="heght:30px;" />
									<h:panelGroup>
										<a href="#"> <h:graphicImage id="info_cpf"
												library="imagens" name="duvidared.ico" width="20" /> </a>
									</h:panelGroup>
								</h:panelGrid>
							</h:panelGroup>
							<h:outputLabel value="Senha " for="senha" />
							<h:inputText value="#{contratanteBean.usuario.senha}" size="15"
								id="senha" label="Senha" style="heght:30px;" />
							<h:outputLabel value="Confirmar senha " for="confirmaSenha" />
							<h:inputText value="#{contratanteBean.confirmaSenha}" size="15"
								id="confirmaSenha" label="Confirma Senha" style="heght:30px;" />
						</h:panelGrid>
					</div>
					<div style="padding-left: 30px; float: left; margin-bottom: 10px;">
						<h:panelGrid cellspacing="2" columns="2">
							<h:outputLabel value="CEP" for="cep" />
							<h:inputText id="cep" value="#{contratanteBean.endereco.cep}"
								maxlength="9" size="15" placeholder="Informe o CEP" />
							<h:outputLabel value="Rua" for="rua" />
							<h:inputText id="rua" value="#{contratanteBean.endereco.rua}"
								size="30" placeholder="Nome da Rua / Logradouro" />
							<h:outputLabel value="Numero" for="num" />
							<h:inputText value="#{contratanteBean.endereco.numero}" id="num"
								label="num" size="15" />
							<h:outputLabel value="Bairro" for="bairro" />
							<h:inputText id="bairro"
								value="#{contratanteBean.endereco.bairro}" size="30" />
							<h:outputLabel value="Cidade" for="cidade" />
							<h:inputText id="cidade" label="cidade"
								placeholder="Informe a Cidade"
								value="#{contratanteBean.endereco.cidade}" size="30" />
							<h:outputLabel value="UF" for="uf" />
							<h:inputText id="uf" label="uf"
								value="#{contratanteBean.endereco.uf}" size="10" />
						</h:panelGrid>
					</div>
					<div class="grid_7 map" id="map1"
						style="width: 500px; height: 280px; float: left;"></div>
					<div style="clear: both; padding-left: 140px; width: 300px;">
						<h:commandButton value="Salvar" action="#{contratanteBean.salvar}"
							styleClass="button_login" />
						<h:commandButton value="Cancelar" action="/publico/login.xhtml"
							styleClass="button_login" />
					</div>
				</h:form>
			</div>
		</div>
	</ui:define>
</ui:composition>
</html>